 
local test = model.__new( _CONF["redis"] , "redis");
    
    test.key = 'test_model_rank';
   
   ---------zadd 有序---------- 
   function test.zadd() 
        test.execute():zadd((test.key)..2, os.time() , '{f=4,a=6}');
        return  test.execute():expire((test.key)..2, '3600');  
   end
     
      
   function test.zrange()
        return test.execute():zrevrange((test.key)..2, 0, 9, "WITHSCORES"); 
   end
    
    
    function test.zrangebyscore()
         local endtime =  os.time(); 
         return  test.execute():zrangebyscore((test.key)..2, endtime-10000, endtime, "WITHSCORES"); 
    end    
    
   --------string ------- 
   --set
  	function test.set()
	      test.execute():set(test.key, 1);
	      return  test.execute():expire(test.key, '3600');  
	end
      
   --get 
	function test.get()
	        return test.execute():get(test.key);
	end
    
    --incr自增
  	function test.incr()
	     return test.execute():incr(test.key);
	end
   
    --del
	function test.del()  
	        return test.execute():del(test.key);
	end
	 
	--exists
	function test.exists()
	   return test.execute():exists(test.key); 
	end
	
	--ttl 
	function test.ttl()
	   return test.execute():ttl(test.key); 
	end
 
 
 
  ------- hash -------	 
	function test.hset(k, v)
	  return  test.execute():hset(test.key, k, v); 
	end
	  
	function test.hget(k)
	  return  test.execute():hget(test.key, k); 
	end  
	
	function test.hkeys()
	   return test.execute():hkeys(test.key); 
	end
 
	function test.hvals()
	  return  test.execute():hvals(test.key); 
	end
	
	function test.hgetall()
	   return test.execute():hgetall(test.key); 
	end
	 
	function test.hexists(k)
	  return  test.execute():hexists(test.key, k); 
	end
	
	function test.hincrby(k)
	   return test.execute():hincrby(test.key, k); 
	end
	 
	function test.hmset(tab)
	   return  test.execute():hmset(test.key, tab); 
	end
	
	function test.hmget(k)
	  return  test.execute():hmset(test.key, k); 
	end
  
 
return test;  